<?php
/* @var $this ProjectController */
/* @var $model Project */
/* @var $form CActiveForm */
?>

<div class="form">
	<?php if(count($model->getErrors()) > 0):?>
		<div class="alert alert-danger">
			<?php echo BSHtml::errorSummary($model); ?>
		</div>
	<?php endif;?>
	<?php echo BSHtml::beginForm(); ?>
	<fieldset>
		<legend><?php echo $model->isNewRecord ? 'Создать' : 'Редактировать'; ?> проект</legend>
		<p class="note">Поля, помеченные <span class="required">*</span> обязательны для заполнения.</p>
		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'name', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeTextField($model,'name'); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'description', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeTextArea($model,'description'); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'sow', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeFileField($model,'sow'); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'id_user_customer', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeDropDownList($model,'id_user_customer',
					CHtml::listData(User::model()->customers()->findAll(), 'id', 'name')
				); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'id_user_manager', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeDropDownList($model,'id_user_manager',
					CHtml::listData(User::model()->managers()->findAll(), 'id', 'name')
				); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'budget', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeTextField($model,'budget'); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'date_started', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeTextField($model,'date_started', array('class'=>'datepicker')); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo BSHtml::activeLabelEx($model,'date_finished', array('class'=>'col-lg-2')); ?>
			<div class="col-lg-10">
				<?php echo BSHtml::activeTextField($model,'date_finished', array('class'=>'datepicker')); ?>
			</div>
		</div>

		<div class="form-group">
			<div class="col-lg-10 col-lg-offset-2 align-right">
				<?php echo BSHtml::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить'); ?>
			</div>
		</div>
	</fieldset>
<?php echo BSHtml::endForm(); ?>

</div><!-- form -->